/**
 * Created by shudong.msd(风骐) on 2016/4/27.
 */


app.directive('logoutConfirm',function(){

    return{
        restrict:'A',
        link:function(scope,ele,attr){
            ele.confirm({
                text: "您确定要退出此账号吗？",
                confirm: function(button) {
                    scope.logout();
                },
                cancel: function(button) {
                    // nothing to do
                },
                confirmButton: "确定",
                cancelButton: "取消",
                post: false,
                confirmButtonClass: "mz-ok-btn",
                cancelButtonClass: "mz-no-btn",
                dialogClass: "mz-dialog"
            });
        }
    };
});